<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: SelectionTransformTool类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_selection_transform_tool.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="#pri-attribs">Private 属性</a> &#124;
<a href="#pri-static-attribs">静态 Private 属性</a> &#124;
<a href="class_selection_transform_tool-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">SelectionTransformTool类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>The selection transform tool computes the transform matrix from mouse input. It then updates the cloud's transform matrix for the selected points so that the transformed and selected points will be rendered appropriately. Note that, the actual coordinates of the selected points are not updated until the end of the mouse input. At the end of a mouse input (i.e. when the mouse button is released), a transform command is created to update the actual coordinates of the selected points.  
 <a href="class_selection_transform_tool.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="selection_transform_tool_8h_source.html">selectionTransformTool.h</a>&gt;</code></p>
<div class="dynheader">
类 SelectionTransformTool 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_selection_transform_tool.png" usemap="#SelectionTransformTool_map" alt=""/>
  <map id="SelectionTransformTool_map" name="SelectionTransformTool_map">
<area href="class_tool_interface.html" title="the parent class of all the select and the transform tool classes" alt="ToolInterface" shape="rect" coords="0,0,145,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a67448cd5c36030d6b7c4fda95ca22a72"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a67448cd5c36030d6b7c4fda95ca22a72">SelectionTransformTool</a> (<a class="el" href="local_types_8h.html#a9593545ca38af82dfae060606c43a0f2">ConstSelectionPtr</a> selection_ptr, <a class="el" href="local_types_8h.html#ab270fe8bf56ceef23c1c5fbe384c9430">CloudPtr</a> cloud_ptr, <a class="el" href="local_types_8h.html#a63a1fb56278f2c6f6d6a3e7130c13b2b">CommandQueuePtr</a> command_queue_ptr)</td></tr>
<tr class="memdesc:a67448cd5c36030d6b7c4fda95ca22a72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor  <a href="class_selection_transform_tool.html#a67448cd5c36030d6b7c4fda95ca22a72">更多...</a><br /></td></tr>
<tr class="separator:a67448cd5c36030d6b7c4fda95ca22a72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51928a725e824b7be7ad8f65aa42d2aa"><td class="memItemLeft" align="right" valign="top"><a id="a51928a725e824b7be7ad8f65aa42d2aa"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a51928a725e824b7be7ad8f65aa42d2aa">~SelectionTransformTool</a> ()</td></tr>
<tr class="memdesc:a51928a725e824b7be7ad8f65aa42d2aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor <br /></td></tr>
<tr class="separator:a51928a725e824b7be7ad8f65aa42d2aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61a677d4ffe765344e26d155aad4dc9b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a61a677d4ffe765344e26d155aad4dc9b">start</a> (int x, int y, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> modifiers, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> buttons)</td></tr>
<tr class="memdesc:a61a677d4ffe765344e26d155aad4dc9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the transform tool with mouse screen coordinates and key modifiers.  <a href="class_selection_transform_tool.html#a61a677d4ffe765344e26d155aad4dc9b">更多...</a><br /></td></tr>
<tr class="separator:a61a677d4ffe765344e26d155aad4dc9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada11f1b70b253a6be1b2daa85f7c6f7e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#ada11f1b70b253a6be1b2daa85f7c6f7e">update</a> (int x, int y, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> modifiers, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> buttons)</td></tr>
<tr class="memdesc:ada11f1b70b253a6be1b2daa85f7c6f7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Updates the transform matrix of this object with mouse screen coordinates and key modifiers. Then the selection_matrix_ in the cloud is further updated.  <a href="class_selection_transform_tool.html#ada11f1b70b253a6be1b2daa85f7c6f7e">更多...</a><br /></td></tr>
<tr class="separator:ada11f1b70b253a6be1b2daa85f7c6f7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad79092f5a3ff8495ff4430c182be8e5a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#ad79092f5a3ff8495ff4430c182be8e5a">end</a> (int x, int y, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> modifiers, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> buttons)</td></tr>
<tr class="memdesc:ad79092f5a3ff8495ff4430c182be8e5a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update the transform matrix for the selected points using the final position of the mouse. To finalize the transformation, we then create a transform command which computes the new coordinates of the selected points after transformation.  <a href="class_selection_transform_tool.html#ad79092f5a3ff8495ff4430c182be8e5a">更多...</a><br /></td></tr>
<tr class="separator:ad79092f5a3ff8495ff4430c182be8e5a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41af88180d8c0c904d31e8537e15a5a4"><td class="memItemLeft" align="right" valign="top"><a id="a41af88180d8c0c904d31e8537e15a5a4"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a41af88180d8c0c904d31e8537e15a5a4">draw</a> () const</td></tr>
<tr class="memdesc:a41af88180d8c0c904d31e8537e15a5a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This does not do anything. <br /></td></tr>
<tr class="separator:a41af88180d8c0c904d31e8537e15a5a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_tool_interface"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_tool_interface')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="class_tool_interface.html">ToolInterface</a></td></tr>
<tr class="memitem:a6cbd00e85c2e49d19bf30ca06a0cf1ab inherit pub_methods_class_tool_interface"><td class="memItemLeft" align="right" valign="top"><a id="a6cbd00e85c2e49d19bf30ca06a0cf1ab"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_tool_interface.html#a6cbd00e85c2e49d19bf30ca06a0cf1ab">~ToolInterface</a> ()</td></tr>
<tr class="memdesc:a6cbd00e85c2e49d19bf30ca06a0cf1ab inherit pub_methods_class_tool_interface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a6cbd00e85c2e49d19bf30ca06a0cf1ab inherit pub_methods_class_tool_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:a8102173ce07c68dd6fc876bc778d410f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a8102173ce07c68dd6fc876bc778d410f">getRotateMatrix</a> (int dx, int dy, float *rotation_matrix_a, float *rotation_matrix_b, <a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a> buttons) const</td></tr>
<tr class="memdesc:a8102173ce07c68dd6fc876bc778d410f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the modelview matrix for rotation.  <a href="class_selection_transform_tool.html#a8102173ce07c68dd6fc876bc778d410f">更多...</a><br /></td></tr>
<tr class="separator:a8102173ce07c68dd6fc876bc778d410f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68852f3a998b441cb072c079c8e95dcc"><td class="memItemLeft" align="right" valign="top"><a id="a68852f3a998b441cb072c079c8e95dcc"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a68852f3a998b441cb072c079c8e95dcc">findSelectionCenter</a> ()</td></tr>
<tr class="memdesc:a68852f3a998b441cb072c079c8e95dcc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the centroid of the selected points <br /></td></tr>
<tr class="separator:a68852f3a998b441cb072c079c8e95dcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private 属性</h2></td></tr>
<tr class="memitem:a05a1cd17f7b2bd965f390a70a8d6acbf"><td class="memItemLeft" align="right" valign="top"><a id="a05a1cd17f7b2bd965f390a70a8d6acbf"></a>
<a class="el" href="local_types_8h.html#a9593545ca38af82dfae060606c43a0f2">ConstSelectionPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a05a1cd17f7b2bd965f390a70a8d6acbf">selection_ptr_</a></td></tr>
<tr class="memdesc:a05a1cd17f7b2bd965f390a70a8d6acbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">a shared pointer pointing to the selection object <br /></td></tr>
<tr class="separator:a05a1cd17f7b2bd965f390a70a8d6acbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4000549c4472895b34d59a9aa72810e8"><td class="memItemLeft" align="right" valign="top"><a id="a4000549c4472895b34d59a9aa72810e8"></a>
<a class="el" href="local_types_8h.html#ab270fe8bf56ceef23c1c5fbe384c9430">CloudPtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a4000549c4472895b34d59a9aa72810e8">cloud_ptr_</a></td></tr>
<tr class="memdesc:a4000549c4472895b34d59a9aa72810e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">a shared pointer pointing to the cloud object <br /></td></tr>
<tr class="separator:a4000549c4472895b34d59a9aa72810e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e5ab13a5b64f89cca01217716a93bac"><td class="memItemLeft" align="right" valign="top"><a id="a4e5ab13a5b64f89cca01217716a93bac"></a>
<a class="el" href="local_types_8h.html#a63a1fb56278f2c6f6d6a3e7130c13b2b">CommandQueuePtr</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a4e5ab13a5b64f89cca01217716a93bac">command_queue_ptr_</a></td></tr>
<tr class="memdesc:a4e5ab13a5b64f89cca01217716a93bac"><td class="mdescLeft">&#160;</td><td class="mdescRight">a shared pointer pointing to the command queue of the widget. <br /></td></tr>
<tr class="separator:a4e5ab13a5b64f89cca01217716a93bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a839ce2a9fd46fe9cedb508e2e412d21f"><td class="memItemLeft" align="right" valign="top"><a id="a839ce2a9fd46fe9cedb508e2e412d21f"></a>
<a class="el" href="class_track_ball.html">TrackBall</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a839ce2a9fd46fe9cedb508e2e412d21f">trackball_</a></td></tr>
<tr class="memdesc:a839ce2a9fd46fe9cedb508e2e412d21f"><td class="mdescLeft">&#160;</td><td class="mdescRight">the trackball associated with this transform <br /></td></tr>
<tr class="separator:a839ce2a9fd46fe9cedb508e2e412d21f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31338475b394b5ad96d9c5e6f8123dc3"><td class="memItemLeft" align="right" valign="top"><a id="a31338475b394b5ad96d9c5e6f8123dc3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a31338475b394b5ad96d9c5e6f8123dc3">x_</a></td></tr>
<tr class="memdesc:a31338475b394b5ad96d9c5e6f8123dc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">last recorded mouse positions <br /></td></tr>
<tr class="separator:a31338475b394b5ad96d9c5e6f8123dc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab79590b0cf25e6af3a5c599fd0c467fb"><td class="memItemLeft" align="right" valign="top"><a id="ab79590b0cf25e6af3a5c599fd0c467fb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>y_</b></td></tr>
<tr class="separator:ab79590b0cf25e6af3a5c599fd0c467fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0eb9bfa378e145d09aeede2e17dd7b9b"><td class="memItemLeft" align="right" valign="top"><a id="a0eb9bfa378e145d09aeede2e17dd7b9b"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a0eb9bfa378e145d09aeede2e17dd7b9b">center_xyz_</a> [<a class="el" href="local_types_8h.html#a836d92df79d664ff6130b35f0c3c95ff">XYZ_SIZE</a>]</td></tr>
<tr class="memdesc:a0eb9bfa378e145d09aeede2e17dd7b9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The centroid of the selected points. <br /></td></tr>
<tr class="separator:a0eb9bfa378e145d09aeede2e17dd7b9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6736dbf5b1d3363121d0ad0a05a88ca1"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a6736dbf5b1d3363121d0ad0a05a88ca1">transform_matrix_</a> [<a class="el" href="local_types_8h.html#a28c0b3f93eed6b2e58d2192b7ef2d8f4">MATRIX_SIZE</a>]</td></tr>
<tr class="separator:a6736dbf5b1d3363121d0ad0a05a88ca1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7670bdb6cbdb1fec4683240bce33c0e7"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a7670bdb6cbdb1fec4683240bce33c0e7">translate_factor_</a></td></tr>
<tr class="separator:a7670bdb6cbdb1fec4683240bce33c0e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a747c350e8f43b35af124ad2592bfca6f"><td class="memItemLeft" align="right" valign="top"><a id="a747c350e8f43b35af124ad2592bfca6f"></a>
<a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a747c350e8f43b35af124ad2592bfca6f">modifiers_</a></td></tr>
<tr class="memdesc:a747c350e8f43b35af124ad2592bfca6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">the copy of the modifiers passed in the start function. <br /></td></tr>
<tr class="separator:a747c350e8f43b35af124ad2592bfca6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-attribs"></a>
静态 Private 属性</h2></td></tr>
<tr class="memitem:a0f0c5d58db9db7b3c6ed6d051d6d273a"><td class="memItemLeft" align="right" valign="top"><a id="a0f0c5d58db9db7b3c6ed6d051d6d273a"></a>
static const float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_selection_transform_tool.html#a0f0c5d58db9db7b3c6ed6d051d6d273a">DEFAULT_TRANSLATE_FACTOR_</a></td></tr>
<tr class="memdesc:a0f0c5d58db9db7b3c6ed6d051d6d273a"><td class="mdescLeft">&#160;</td><td class="mdescRight">default translation factor <br /></td></tr>
<tr class="separator:a0f0c5d58db9db7b3c6ed6d051d6d273a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pro_methods_class_tool_interface"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_class_tool_interface')"><img src="closed.png" alt="-"/>&#160;Protected 成员函数 继承自 <a class="el" href="class_tool_interface.html">ToolInterface</a></td></tr>
<tr class="memitem:a998b140ab5373f0fe15571e485eaadd7 inherit pro_methods_class_tool_interface"><td class="memItemLeft" align="right" valign="top"><a id="a998b140ab5373f0fe15571e485eaadd7"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_tool_interface.html#a998b140ab5373f0fe15571e485eaadd7">ToolInterface</a> ()</td></tr>
<tr class="memdesc:a998b140ab5373f0fe15571e485eaadd7 inherit pro_methods_class_tool_interface"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor <br /></td></tr>
<tr class="separator:a998b140ab5373f0fe15571e485eaadd7 inherit pro_methods_class_tool_interface"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>The selection transform tool computes the transform matrix from mouse input. It then updates the cloud's transform matrix for the selected points so that the transformed and selected points will be rendered appropriately. Note that, the actual coordinates of the selected points are not updated until the end of the mouse input. At the end of a mouse input (i.e. when the mouse button is released), a transform command is created to update the actual coordinates of the selected points. </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a67448cd5c36030d6b7c4fda95ca22a72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67448cd5c36030d6b7c4fda95ca22a72">&#9670;&nbsp;</a></span>SelectionTransformTool()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SelectionTransformTool::SelectionTransformTool </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a9593545ca38af82dfae060606c43a0f2">ConstSelectionPtr</a>&#160;</td>
          <td class="paramname"><em>selection_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#ab270fe8bf56ceef23c1c5fbe384c9430">CloudPtr</a>&#160;</td>
          <td class="paramname"><em>cloud_ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a63a1fb56278f2c6f6d6a3e7130c13b2b">CommandQueuePtr</a>&#160;</td>
          <td class="paramname"><em>command_queue_ptr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">selection_ptr</td><td>a shared pointer pointing to the selection object. </td></tr>
    <tr><td class="paramname">cloud_ptr</td><td>a shared pointer pointing to the cloud object. </td></tr>
    <tr><td class="paramname">command_queue_ptr</td><td>a shared pointer pointing to the command queue. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ad79092f5a3ff8495ff4430c182be8e5a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad79092f5a3ff8495ff4430c182be8e5a">&#9670;&nbsp;</a></span>end()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SelectionTransformTool::end </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>modifiers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>buttons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Update the transform matrix for the selected points using the final position of the mouse. To finalize the transformation, we then create a transform command which computes the new coordinates of the selected points after transformation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>the x value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">y</td><td>the y value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">modifiers</td><td>the key modifier. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="class_tool_interface.html#a4fb40ef19c64340bf59b135fbe2df84a">ToolInterface</a>.</p>

</div>
</div>
<a id="a8102173ce07c68dd6fc876bc778d410f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8102173ce07c68dd6fc876bc778d410f">&#9670;&nbsp;</a></span>getRotateMatrix()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SelectionTransformTool::getRotateMatrix </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>dy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>rotation_matrix_a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float *&#160;</td>
          <td class="paramname"><em>rotation_matrix_b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>buttons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Computes the modelview matrix for rotation. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">dx</td><td>the distance between the x coordinates of the starting and ending cursor position. </td></tr>
    <tr><td class="paramname">dy</td><td>the distance between the y coordinates of the starting and ending cursor position. </td></tr>
    <tr><td class="paramname">rotation_matrix_a</td><td>a 4x4 matrix following OpenGL's format implementing rotation along x-axis. </td></tr>
    <tr><td class="paramname">rotation_matrix_b</td><td>a 4x4 matrix following OpenGL's format implementing rotation along y or z-axis, which depens on which the mouse button that is being pressed during the rotation operation. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a61a677d4ffe765344e26d155aad4dc9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61a677d4ffe765344e26d155aad4dc9b">&#9670;&nbsp;</a></span>start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SelectionTransformTool::start </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>modifiers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>buttons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Initialize the transform tool with mouse screen coordinates and key modifiers. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>the x value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">y</td><td>the y value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">modifiers</td><td>the key modifier. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="class_tool_interface.html#a5ede982d2daba0589ff7c1034feed76c">ToolInterface</a>.</p>

</div>
</div>
<a id="ada11f1b70b253a6be1b2daa85f7c6f7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada11f1b70b253a6be1b2daa85f7c6f7e">&#9670;&nbsp;</a></span>update()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SelectionTransformTool::update </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>modifiers</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="local_types_8h.html#a3ecbdde19ccb48639e25359e09b9f2ff">BitMask</a>&#160;</td>
          <td class="paramname"><em>buttons</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Updates the transform matrix of this object with mouse screen coordinates and key modifiers. Then the selection_matrix_ in the cloud is further updated. </p>
<p>We first compute the changes between the initial and the current mouse screen coordinates. Then depending on the passed modifiers, the transformation matrix is computed correspondingly. If CONTROL is pressed the selection will be translated (panned) parallel to the view plane. If ALT is pressed the selection witll be translated along the z-axis perpendicular to the view plane. If no key modifiers is pressed the selection will be rotated. </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>the x value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">y</td><td>the y value of the mouse screen coordinates. </td></tr>
    <tr><td class="paramname">modifiers</td><td>the key modifier. CONTROL pans the selection parallel to the view plane. ALT moves the selection in/out along the z-axis (perpendicular to the view plane). If no modifier is pressed then the selection is rotated. </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="class_tool_interface.html#ab93188bd97a99ede4370d1917d66e35a">ToolInterface</a>.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a6736dbf5b1d3363121d0ad0a05a88ca1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6736dbf5b1d3363121d0ad0a05a88ca1">&#9670;&nbsp;</a></span>transform_matrix_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float SelectionTransformTool::transform_matrix_[<a class="el" href="local_types_8h.html#a28c0b3f93eed6b2e58d2192b7ef2d8f4">MATRIX_SIZE</a>]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>the transform matrix to be used for updating the coordinates of the selected points in the cloud </p>

</div>
</div>
<a id="a7670bdb6cbdb1fec4683240bce33c0e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7670bdb6cbdb1fec4683240bce33c0e7">&#9670;&nbsp;</a></span>translate_factor_</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">float SelectionTransformTool::translate_factor_</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>scaling factor used to control the speed which the display translates the point cloud </p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/<a class="el" href="selection_transform_tool_8h_source.html">selectionTransformTool.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_selection_transform_tool.html">SelectionTransformTool</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
